from typing import AsyncGenerator
from langchain_openai import ChatOpenAI
from fastapi import Request


async def get_langchain_llm(
    request: Request
) -> AsyncGenerator[ChatOpenAI, None]:
    """
    Get langchain llm
    """
    return request.app.state.langchain_llm